package com.dnzx.client.impl;

import java.util.List;

import org.dnzx.framework.page.PageResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.dnzx.client.IMenuClient;
import com.dnzx.model.system.MenuBO;
import com.dnzx.service.IMenuService;

/**
 * <p>cms系统后台资源client实现类</p>
 *
 * @author Steven
 * @version V1.0
 * @Package com.rcss.client.service.impl
 * 
 * @date 2017/9/15 11:13
 */
@Service("cmsResourceClient")
public class MenuClientImpl implements IMenuClient {
	
	private static Logger logger = LoggerFactory.getLogger(MenuClientImpl.class);
	
	@Autowired
	private IMenuService menuService;

	
	@Override
    public void save(MenuBO menuBO) {
        this.menuService.save(menuBO);
    }
    
    @Override
    public void delete(Long id) {
        this.menuService.delete(id);
    }

    @Override
    public void update(MenuBO menuBO) {
        this.menuService.update(menuBO);
    }
    
    @Override
    public MenuBO get(Long id) {
        return this.menuService.get(id);
    }

	@Override
	public List<MenuBO> queryList(MenuBO menuBO) {
		return this.menuService.queryList(menuBO);
	}
	
	@Override
	public PageResult<List<MenuBO>> queryPage(MenuBO menuBO, PageResult<List<MenuBO>> pageResult) {
		return this.menuService.queryPage(menuBO, pageResult);
	}
	
	@Override
	public MenuBO queryTree(Long roleId) {
		return this.menuService.queryTree(roleId);
	}
	
	@Override
	public MenuBO queryTreeByRole(Long roleId) {
		return this.menuService.queryTreeByRole(roleId);
	}
	
}
